package com.appkubes.fintech.restful.application.pay.enums;

import java.util.HashMap;
import java.util.Map;

/***
 * 微信支付方式枚举 app wap 扫码
 * @author ocean
 * @date 2019-04-17
 */
public enum WeChatPayEnums {
	APP("APP","APP支付"),	//	app支付
	JSAPI("JSAPI","微信H5支付"), 	//	商户已有H5商城网站，用户通过消息或扫描二维码在微信内打开网页时，可以调用微信支付完成下单购买的流程
	NATIVE("NATIVE","扫码支付"),	//	扫码支付
	MWEB("MWEB","H5支付");		//	H5支付是指商户在微信客户端外的移动端网页支付



	private static Map<String, WeChatPayEnums> codeMap;
	private String value;
	private String name;

	static { codeMap = new HashMap ();
		for (WeChatPayEnums code : values()){
			codeMap.put(code.getValue(), code);
		}
	}

	public static WeChatPayEnums codeOf(String code)
	{
		return (WeChatPayEnums)codeMap.get(code);
	}

	private WeChatPayEnums(String value, String name)
	{
		this.value = value;
		this.name = name;
	}

	public String getValue() {
		return this.value;
	}

	public String getName() {
		return this.name;
	}
}
